<script setup lang="ts">
import { ref, provide } from "vue";
import Son from "./Son.vue";

const car = ref("法拉力");

provide("car", car);
</script>

<template>
  <div class="box">
    <h1>Provide和Inject</h1>
    <div>我的车：{{ car }}</div>
    <Son />
  </div>
</template>

<style scoped>
.box {
  max-width: 100%;
  min-height: 400px;
  background: bisque;
  padding: 1rem;
}
</style>
